package cn.lili.modules.promotion.fallback;

import cn.lili.common.enums.ResultCode;
import cn.lili.common.exception.ServiceException;
import cn.lili.modules.promotion.client.SeckillClient;
import cn.lili.modules.promotion.entity.dos.Seckill;
import cn.lili.modules.promotion.entity.dto.SeckillCheckDTO;
import cn.lili.modules.promotion.entity.dto.search.SeckillSearchParams;

import java.util.List;

/**
 * @author: ftyy
 * @date: 2022-01-17 11:19
 * @description: 描述
 */
public class SeckillFallback implements SeckillClient {

    @Override
    public boolean generatorSeckill() {
        throw new ServiceException();
    }

    @Override
    public boolean savePromotions(Seckill seckill) {
        throw new ServiceException();
    }

    /**
     * 根据条件查询秒杀活动
     *
     * @param searchParams 查询参数
     * @return 秒杀活动列表
     */
    @Override
    public List<Seckill> listFindAll(SeckillSearchParams searchParams) {
        throw new ServiceException(ResultCode.SECKILL_NOT_EXIST_ERROR);
    }

    @Override
    public List<Seckill> checkSeckillIsActive(SeckillCheckDTO seckillCheckDTO) {
        throw new ServiceException();
    }

    @Override
    public Boolean deleteSeckillGoods(SeckillSearchParams searchParams) {
        throw new ServiceException();
    }
}
